import csv

filename="xiaofei.csv"
conditions=input("请输入要查询的条件（以逗号分隔，如省份，项目）：")
conditions_list=conditions.split(",")
province=conditions_list[0].strip()
item=conditions_list[1].strip()


with open(filename,"r") as file:
    reader=csv.reader(file)
    header=next(reader)
    result =[]
    for row in reader:
        if row[0].strip()==province and row[2].strip()==item:
            result.append(row)
    if result:
        print("{:<10}{:<10}{:<10}{:<10}".format(header[0],header[1],header[2],header[3]))
        for row in result:
           print("{:<10}{:<10}{:<10}{:<10}".format(header[0],header[1],header[2],header[3]))
    else:
        print("没有找到符合条件的记录！")